<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Author Mikael Andersson Ynghammar, Johan Sandström, Daniel Nicklasson -->
<ui:composition
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.prime.com.tr/ui"
    xmlns:f="http://java.sun.com/jsf/core"
    template="WEB-INF/facelets/template.xhtml">

    <ui:define name="content">
        <h:form>

            <p:panel header="Every field is required!">
                <h:panelGrid columns="3">
                    E-Mail: <h:inputText id="regemail" value="#{registerBackingBean.email}">

                    </h:inputText>
                    <p:message for="regemail" showDetail="false" showSummary="true"></p:message>
                    <p>Name: <h:inputText id="regname" value="#{registerBackingBean.name}">

                        </h:inputText> 
                        <p:message for="regname" showDetail="false" showSummary="true"></p:message></p>
                    <p>Password: <h:inputSecret id="regpwd" value="#{registerBackingBean.passwd}">

                        </h:inputSecret> 
                        <p:message for="regpwd" showDetail="false" showSummary="true"></p:message></p>
                    <p>Street: <h:inputText id="regstreet" value="#{registerBackingBean.street}">

                        </h:inputText> 
                        <p:message for="regstreet" showDetail="false" showSummary="true"></p:message></p>
                    <p>City: <h:inputText id="regcity" value="#{registerBackingBean.city}">
                        </h:inputText> 
                        <p:message for="regcity" showDetail="false" showSummary="true"></p:message></p>
                    <p>Country: <h:inputText id="regcountry" value="#{registerBackingBean.country}">
                        </h:inputText> 
                        <p:message for="regcountry" showDetail="false" showSummary="true"></p:message></p>
                </h:panelGrid>
            </p:panel>

            <h:commandButton value="Register" actionListener="#{registerControllerBean.addShopUser()}" action="goHome" />


        </h:form>
    </ui:define>
    <ui:define name="right">
    </ui:define>

</ui:composition>
